# -*- coding: utf-8 -*-
"""
Created on Sat Jun  9 17:31:55 2012

@author: nzhao
"""

from traits.api import HasTraits, Button, Str
from traitsui.api import View, Item, Group, HGroup

from core.MultiSpin import *
from gui.SpinViewer import *

log_text_group = Group(Item('log_text', height = 0.8, show_label = False, style = 'custom'),
                       label = 'Log Text',
                       show_border = True
                       )

class SpinSolver(HasTraits):
    spin_list = DelegatesTo('multi_spin')
    multi_spin = Instance(MultiSpin)
    
    log_text = Str
    
    view = View(spin_viewer_group,
                log_text_group,
                
                width = 0.8,
                height = 0.9,
                resizable = True,
                kind='live'
                )
    
if __name__ == '__main__':
    solver1 = SpinSolver(multi_spin = MultiSpin() )
    solver1.configure_traits()